import java.util.Scanner;

//在同一个类中定义多个方法：要求不仅可以求2个整数的最大值，还可以求3个小数的最大值？
public class TextDemo {
    public static  int Max(int a,int b){
        if(a>=b)
            return a;
        else
            return b;
    }
    public static  double Max(double x,double y,double z){
        double max1=0;
        if(x>=y)
            max1=x;
        else
            max1=y;
        if(max1>=z)
            return max1;
        else
            return z;

    }
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int a=sc.nextInt();
        int b=sc.nextInt();
        double x=sc.nextDouble();
        double y=sc.nextDouble();
        double z=sc.nextDouble();
        int max1=Max(a,b);
        double max2=Max(x,y,z);
        System.out.println(max1);
        System.out.println(max2);
    }
}
